import com.idefav.pojo.TdUser;
import com.idefav.service.UserService;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

/**
 * Created by wzs on 2017/7/16.
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:/spring/*.xml")
public class ssmdemotest {
    @Autowired
    private UserService userService;

    @Test
    public void test1(){
        List<TdUser> allUser = userService.getAllUser();
        if(allUser!=null){
            Assert.assertTrue(true);
        }
        else{
            Assert.assertFalse(true);
        }
    }
}
